/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.hugo.senai.dao;

import br.com.hugo.senai.entities.Usuario;
import java.io.Serializable;
import org.hibernate.Session;

/**
 *
 * @author Hugo
 */
public class UsuarioDAO implements GenericDAO<Usuario, Serializable> {

    private final Session session;

    SimpleSession ss = new SimpleSession();

    public UsuarioDAO() {
        this.session = ss.getSession();
    }

    @Override
    public Usuario save(Usuario entity) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public void delete(Usuario entity) {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    @Override
    public Usuario findByPrimaryKey(Serializable id) {
        ss.beginTransaction();
        return (Usuario) session.get(Usuario.class, id);

    }

}
